﻿<%@ Page Language="C#" MasterPageFile="~/layout/TwoColumn.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Plain.Demo.Blog.web._Default" %>
<%@ Import Namespace="System" %>
<%@ Import Namespace="Plain.Demo.Blog" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Register Assembly="Plain.Web" Namespace="Plain.Web" TagPrefix="plain" %>
<asp:Content ContentPlaceHolderID="cphColumn1" ID="ctnColumn1" runat="server">  
    <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam pellentesque enim blandit enim bibendum blandit.
                            Integer eu leo ac est aliquet imperdiet. Quisque nec justo id augue posuere malesuada. Nullam ac metus. Cras non leo
                            ut est placerat condimentum. Aliquam ut enim. Quisque non sapien in enim eleifend faucibus. Pellentesque sodales. Mauris
                            auctor arcu sit amet felis. Donec eget enim ut lacus pharetra condimentum. Nulla in felis vel tortor imperdiet consectetuer.
                            Sed id ante.</p>
</asp:Content>
<asp:Content ContentPlaceHolderID="cphColumn2" ID="ctnColumn2" runat="server">  
    <asp:ListView ID="lvBlogEntry" runat="server" DataSourceID="pdsBlogEntry" ItemPlaceholderID="itemContainer" >
        <LayoutTemplate>
            <asp:PlaceHolder ID="itemContainer" runat="server" />
        </LayoutTemplate>
        <ItemTemplate>
            <h6><%#((DateTime)Eval("Created")).ToString("dd/MM/yyyy") %></h6>
            <h1><a href="ShowDetailed.aspx?Id=<%#Eval("Id")%>" ><%#Eval("Title") %></a>
            <p>
                <%#Eval("Content")%>
            </p>
            <div>
                <p>Posted by <%#Eval("Author")%></p>
                <p>Comments: </p>
            </div>
            <hr />
        </ItemTemplate>
    </asp:ListView>
    <plain:PlainDataSource ID="pdsBlogEntry" runat="server" Type="Plain.Demo.Blog.BlogEntry, Plain.Demo.Blog" />
</asp:Content>